using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FetCo.Data;
using Friso.Entities;
using Friso.Business;
using FetCo.Framework;
using System.IO;
public partial class InforMember : System.Web.UI.Page
{
    protected long Id
    {
        get
        {
            object o = ViewState["id"];
            if (o != null)
                return (long)o;
            return long.MinValue;
        }
        set
        {
            ViewState["id"] = value;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
            return;
        LoadCurent();
        LoadData();
    }
    #region LoadCurent
    private void LoadCurent()
    {
        ContentPlaceHolder c = Page.Master.FindControl("MainContent") as ContentPlaceHolder;
        UserControl usc = c.FindControl("MenuControl1") as UserControl;
        HtmlGenericControl liInfo = (HtmlGenericControl)usc.FindControl("liInfo");
        liInfo.Attributes.Add("class", "active");
    }

    #endregion
    private void LoadData()
    {
        if (Session["MemberID"] != null)
        {
			
            this.Id = long.Parse(Session["MemberID"].ToString());
            Member _Member = MemberService.GetMember(this.Id);
            if (_Member != null)
            {

                ltrEmail.Text = _Member.Email;
                ltrNameBaby.Text = _Member.NameBaby;
                ltrName.Text = _Member.FullName;
                Province _Province = ProvinceService.GetProvince(_Member.ProvinceId);
                if (_Province != null)
                {
                    ltrAddress.Text = _Province.Title;
                    
                }
                Milk _Milk = MilkService.GetMilk(_Member.TypeMill);
                if (_Milk != null)
                {
                    ltrTypeMilk.Text = _Milk.Title;
                }
                ltrYearBaby.Text = Utilitys.GetFormattedDate(_Member.UpdateDate);
            }
        }
    }
}